#include <stdio.h>
#include <pspkernel.h>
#include <pspdisplay.h>
#include <string.h>
#include <math.h>
#include <psputility.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <pspge.h>
#include "Network.h"
#include "DefGU.h"
#include "opcodes.h"
#include "common.h"
#include "OSK.h"

PSP_MODULE_INFO("PSPMMO", 0, 1, 1);

int main(int argc, char *argv[])
{
	Common CommonCalls;
	CommonCalls.SetupCallbacks();
	
	Graph* graph = new Graph();
	Network* net = new Network(graph);

	net->netDialog();

	net->Connect();

	sceKernelDelayThread(500*1000);
	char keyboardText[1024];
	sprintf(keyboardText,"\0");

	OSK *osk = new OSK(graph);

	net->SendData(Auth,osk->getKeyboard(32,5,"Name:", keyboardText));

	sceKernelSleepThread();	

	sceKernelExitGame();
	return 0;
}